<?php
$host =  $_SERVER['SERVER_ADDR'];
switch ( $host ){
    case "192.168.3.214":
        $dbname = "wx_book";
        break;
    case "192.168.1.213":
        $dbname = "demo_book";
        break;
    default:
        $dbname = "shop";
}
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname='. $dbname,
    'username' => 'root',
    'password' => 'Ssz_2080',
    'charset' => 'utf8',
];
